//
//  PersonViewModel.h
//  CoreData
//
//  Created by ZRAR on 16/1/18.
//  Copyright © 2016年 ZRAR. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "RVMViewModel.h"

@class EditViewModel;

@interface PersonViewModel : RVMViewModel

@property (strong, nonatomic) NSFetchedResultsController *fetchedResultsController;
@property (readonly, nonatomic) NSManagedObjectContext *model;

@property (nonatomic,readonly) RACSignal *updatedContentSingal;

- (NSInteger)numberOfSections;

- (NSInteger)numberOfItemsInSections:(NSInteger)section;

- (NSString *)titleAtIndexPath:(NSIndexPath *)indexPath;

- (NSString *)subtitleAtIndexPath:(NSIndexPath *)indexPath;

- (void)deleteObjectAtIndexPath:(NSIndexPath *)indexPath;

- (EditViewModel *)editViewModelForNewPerson;

- (EditViewModel *)editViewModelForIndexPath:(NSIndexPath *)indexPath;

- (NSString *)titleForSection:(NSInteger)section;

@end
